package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 74646
 * Date: 2022-02-10
 * Time: 11:09
 */

 abstract class A{
    public abstract void  func();
    public static void fun(){
        System.out.println("sdf ");
    }
    static {
        System.out.println("这是A的静态代码块");
    }
    {
        System.out.println("这是A的实例代码块");
    }
    public A(){
        System.out.println("这是A的构造代码块");
    }
}
class B extends A{
    static {
        System.out.println("这是B的静态代码块");
    }
    {
        System.out.println("这是B的实例代码块");
    }
    public B(){
        System.out.println("这是B的构造代码块");
    }

    @Override
    public void func() {

    }
}

public class TestDemo1 {
    public static void main(String[] args) {
        B b = new B();
    }
}
